import React, {useState} from 'react'
import { View, Text } from '@tarojs/components'
import { AtSearchBar } from 'taro-ui'
import './index.scss'

export default function tieSearch() {
  const [searchValue, setSearchValue] = useState('')

  const changeSearchValue = (value) => {
    setSearchValue(value)
  }
  const searchSubmit = () => {
    console.log('开始搜索', searchValue)
  }
  return (
    <View className='tie-search'>
      <AtSearchBar 
        value={searchValue}
        onChange={changeSearchValue}
        onActionClick={searchSubmit}
      />
    </View>
  )
}
